﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Rhomble.Data.Projects
{
	public static class ProjectFilters
	{
		#region Order By

		public static IOrderedQueryable<Project> DefaultOrder(this IQueryable<Project> source)
		{
			return OrderByName(source);
		}

		public static IOrderedQueryable<Project> OrderByName(this IQueryable<Project> source)
		{
			return source.OrderBy(p => p.Name);
		}

		#endregion

		public static IQueryable<Project> WithID(this IQueryable<Project> source, Guid projectID)
		{
			return source.Where(p => p.ProjectPK == projectID);
		}
	}
}
